home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / tpwprog7.arj / IAOUNIT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-07-02  |  829 b   |  41 lines

  1. { iaounit.pas -- Demonstrate unit entry and exit code }
  2.  
  3. unit IAOUnit;
  4.  
  5. interface
  6.  
  7.   { Insert any public declarations here }
  8.  
  9. implementation
  10.  
  11. uses WinTypes, WinProcs;
  12.  
  13. const
  14.  
  15.   caption = 'InAndOut Unit';   { Caption for message box }
  16.  
  17. var
  18.  
  19.   Chain: Pointer;
  20.  
  21. {- Exit procedure. Runs at end of application. }
  22. procedure UnitExitProc; far;
  23. begin
  24.   MessageBox(0, 'Exiting unit', caption,
  25.     mb_TaskModal or mb_Ok);
  26.   ExitProc := Chain
  27. end;
  28.  
  29. begin
  30.   MessageBox(0, 'Entering unit', caption,
  31.     mb_TaskModal or mb_Ok);
  32.   Chain := ExitProc;
  33.   ExitProc := @UnitExitProc
  34. end.
  35.  
  36.  
  37. {--------------------------------------------------------------
  38.   Copyright (c) 1991 by Tom Swan. All rights reserved.
  39.   Revision 1.00    Date: 5/25/1991
  40. ---------------------------------------------------------------}
  41.